﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;

namespace Sinacor.Infra.UI.Controls.SmartClient
{
	public class SinacorWindowLogin : System.Windows.Window
	{
		/// <summary>
		/// True se a janela pertence ao módulo mais
		/// </summary>
		public static readonly DependencyProperty ModulePlusProperty = DependencyProperty.Register("ModulePlus", typeof(bool), typeof(SinacorWindowLogin), new FrameworkPropertyMetadata(false));
		public static readonly DependencyProperty IsLoadingProperty = DependencyProperty.Register("IsLoading", typeof(bool), typeof(SinacorWindowLogin), new FrameworkPropertyMetadata(false));

		public bool ModulePlus
		{
			get { return (bool)GetValue(ModulePlusProperty); }
			set { SetValue(ModulePlusProperty, value); }
		}
		public bool IsLoading
		{
			get { return (bool)GetValue(IsLoadingProperty); }
			set { SetValue(IsLoadingProperty, value); }
		}

		public SinacorWindowLogin()
		{
			this.TryToUpdateLayout();
		}

		void TryToUpdateLayout()
		{
			try { this.UpdateLayout(); }
			catch { }
		}
	}
}
